package com.information.manage.basic.audit.constant;

import lombok.Getter;

@Getter
public enum AuditTaskStatusEnum {
    IN_PROCESS(0, "审核中"),
    PASS(1, "通过"),
    REJECT(2, "驳回"),
    CANCEL(3, "撤销");

    private Integer status;
    private String description;

    AuditTaskStatusEnum(Integer status, String description){
        this.status = status;
        this.description = description;
    }

    public static String getDescByStatus(Integer status) {
        for (AuditTaskStatusEnum item : AuditTaskStatusEnum.values()) {
            if (item.getStatus().equals(status)) {
                return item.getDescription();
            }
        }
        return "-";
    }
}
